/* ====================================== 模块子路由配置  ====================================== */
import React from 'react'
import { Route, Redirect, Switch } from 'react-router-dom'
// ===================================================================== 异步加载
import Import from '@com/lazy/lazy-router'
// ===================================================================== 路由配置
import Workbench from '@views/workbench/main'						// 工作台
import SpecimenManage from '@views/specimen-manage'					// 标本管理
import TestingCenter from '@views/testing-center'					// 检测中心
import TentrustTestingCenter from '@views/entrust-testing-center'	// 委托检测中心
import LaboratoryManage from '@views/laboratory-manage'				// 实验室管理
import SystemSettings from '@views/system-settings'					// 系统设置
import SystemManage from '@views/system-manage'						// 系统管理
import FinanceManage from '@views/finance-manage'					// 财务管理
import BusinessManage from '@views/business-manage'					// 业务管理
import LgisticsSystem from '@views/lgistics-system'					// 物流系统
import ServiceSystem from '@views/service-system'					// 客服系统
import NovelCoroSystem from '@views/novel-coro-system'				// 新冠系统
// ===================================================================== 同步路由
const Index = ({ match }) => {
	const { url } = match
	return (
		<Switch>
			<Route 	path={`${url}/workbench`} 						component={ Workbench }  />
			<Route 	path={`${url}/specimen-manage`} 				component={ SpecimenManage }  />
			<Route 	path={`${url}/testing-center`} 					component={ TestingCenter }  />
			<Route 	path={`${url}/entrust-testing-center`} 			component={ TentrustTestingCenter }  />
			<Route 	path={`${url}/laboratory-manage`} 				component={ LaboratoryManage }  />
			<Route 	path={`${url}/system-settings`} 				component={ SystemSettings }  />
			<Route 	path={`${url}/system-manage`} 					component={ SystemManage }  />
			<Route 	path={`${url}/finance-manage`} 					component={ FinanceManage }  />
			<Route 	path={`${url}/business-manage`} 				component={ BusinessManage }  />
			<Route 	path={`${url}/lgistics-system`} 				component={ LgisticsSystem }  />
			<Route 	path={`${url}/service-system`} 					component={ ServiceSystem }  />
			<Route 	path={`${url}/novel-coro-system`} 				component={ NovelCoroSystem }  />
			{/* 重定向 */}
			<Route path={url} children={<Redirect to={`${url}/workbench/index`} />}  />
			{/* 404 */}
			<Route component={ Import('404') } />
		</Switch>
	)
}

export default Index